#ifndef PREDICTOR_H
#define PREDICTOR_H

#include <QObject>
#include <QPainter>
#include <QtCore>
#include <QString>

static const QString CLOCK_FORMAT= "hh:mm:ss";
static const QString DATE_FORMAT = "yyyy-MM-dd";

class Predictor : public QObject
{
    Q_OBJECT
public:
    Predictor(qint16 timeLimit);
    void setLastDataPredicted(QHash<QString, QString> lastData);
    void setHighestStockValue(QString value);
    QString getHighestStockValue();
    QString STOCK_PRICE_MAX;

signals:
    void drawNextLineToUi(QHash<QString, QString> predictedData);

public slots:
    void startPrediction();
    void predictionMethod();

private:
    QTime startTime;
    QTime stopTime;
    QTime getStartTime();
    QTime getStopTime();

    QHash<QString, QString> lastDataPredicted;
    QHash<QString, QString> getLastDataPredicted();

    static const int MAX_SEC=59;
    static const int STOCK_PRICE_DEC_MAX=100;

};

#endif // PREDICTOR_H
